import { DelUrl, GetUrl, PostUrl, PutUrl } from "@/request/request"
export const GetList = async () => await GetUrl('/get')
// 获取 车次数据 
export const HttpList = async (pageCode, paegSize, val, date, state, type) => await GetUrl('/list', pageCode, paegSize, date, state, type, val)
// 修改 状态 车次 
export const HttpState = async (e, id) => await GetUrl('/state', e, id)
// 删除 车次数据
export const HttpDel = async (id) => await DelUrl('/del', id)
export const TrainAdd = async (form) => await PutUrl('/add', form)
export const EditTrain = async (form) => await PostUrl('/edit', form)
// 登录 注册 1 
// 获取验证码
export const HttpCode = async () => await GetUrl('/code')
// login 登录
export const HttpLogin = async (form) => await PostUrl('/login', form)
// sign 
export const HttpSign = async (form) => await GetUrl('/sign', { ...form })
export const HttpChange = async (form) => await PostUrl('/change', form)//修改密码 

// ----------- 车 站 -------------------- 
export const AddStation = async (city) => await PutUrl('/station/add', city)
// 车票   
export const HttpTicket = async (form) => await GetUrl('/ticket', { ...form })
export const StateTicket = async (id) => await GetUrl('/ticket/state', id)
export const TicketDel = async (id) => await DelUrl('/ticket/del', id)
export const TicketEdit = async (row) => await PostUrl('/ticket/edit', row)
export const AddTicket = async (form) => await PutUrl('/ticket/add', form)

// 订单列表 
export const Ordersdel = async (id) => await DelUrl('/orders/del', id) 
export const OrdersAdd = async (form) => await PutUrl('/orders/add', form)
export const OrderEdit = async (form) => await PostUrl('/order/edit', form)
// 线路
export const HttpAddLine = async (form) => await PutUrl('/addline', form)
export const EditLine = async (row) => await PostUrl('/line/edit', row)
